package com.ruoyi.active.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.active.mapper.CfActivityMapper;
import com.ruoyi.active.domain.CfActivity;
import com.ruoyi.active.service.ICfActivityService;

/**
 * 信息发布Service业务层处理
 * 
 * @author zhangbiao
 * @date 2024-06-04
 */
@Service
public class CfActivityServiceImpl implements ICfActivityService 
{
    @Autowired
    private CfActivityMapper cfActivityMapper;

    /**
     * 查询信息发布
     * 
     * @param id 信息发布主键
     * @return 信息发布
     */
    @Override
    public CfActivity selectCfActivityById(Long id)
    {
        return cfActivityMapper.selectCfActivityById(id);
    }

    /**
     * 查询信息发布列表
     * 
     * @param cfActivity 信息发布
     * @return 信息发布
     */
    @Override
    public List<CfActivity> selectCfActivityList(CfActivity cfActivity)
    {
        return cfActivityMapper.selectCfActivityList(cfActivity);
    }

    /**
     * 新增信息发布
     * 
     * @param cfActivity 信息发布
     * @return 结果
     */
    @Override
    public int insertCfActivity(CfActivity cfActivity)
    {
        cfActivity.setCreateTime(DateUtils.getNowDate());
        return cfActivityMapper.insertCfActivity(cfActivity);
    }

    /**
     * 修改信息发布
     * 
     * @param cfActivity 信息发布
     * @return 结果
     */
    @Override
    public int updateCfActivity(CfActivity cfActivity)
    {
        return cfActivityMapper.updateCfActivity(cfActivity);
    }

    /**
     * 批量删除信息发布
     * 
     * @param ids 需要删除的信息发布主键
     * @return 结果
     */
    @Override
    public int deleteCfActivityByIds(Long[] ids)
    {
        return cfActivityMapper.deleteCfActivityByIds(ids);
    }

    /**
     * 删除信息发布信息
     * 
     * @param id 信息发布主键
     * @return 结果
     */
    @Override
    public int deleteCfActivityById(Long id)
    {
        return cfActivityMapper.deleteCfActivityById(id);
    }
}
